<template>
	<view class="">
		<!-- <view class="search-box">
			<text :class="['tab',activeIndex1==0?'active':'']" @click="changeTab(0)">已开发(5)</text>
			<text :class="['tab',activeIndex1==1?'active':'']" @click="changeTab(1)">未开发(8)</text>
		</view> -->
		<view class="search-content">

			<DevelopedCustomers :type="type" :hasGoodStart="hasGoodStart" ref="developedCustomerRef">
			</DevelopedCustomers>
			<!-- <UndevelopedCustomers v-if="activeIndex1==1" :type="type"></UndevelopedCustomers> -->
		</view>
	</view>

</template>

<script>
	import DevelopedCustomers from './developedCustomers.vue'
	import UndevelopedCustomers from './undevelopedCustomers.vue'
	export default {
		components: {
			DevelopedCustomers,
			UndevelopedCustomers
		},
		props: {
			hasGoodStart: { //1表示包含开门红数据
				type: String,
				default: null
			},
			type: { //1表示存款客户，2表示贷款客户，4表示开门红，5表示不良客户
				type: String,
				required: true,
				default: '1'
			},
		},
		data() {
			return {
				activeIndex1: 0
			}
		},
		methods: {
			changeTab(index) {
				this.activeIndex1 = index
			},
			refreshData() {
				this.$refs.developedCustomerRef.search()
			}

		}
	}
</script>

<style scoped lang="scss">
	.search-box {
		background-color: #F7F7F7;
		padding: 20rpx 20rpx;
	}

	.tab {
		font-size: 28rpx;
		padding: 10rpx 20rpx;

		&.active {

			color: #4696F1;
		}

		&:last-child {
			margin-left: 30rpx;
		}
	}
</style>